package cn.xk.ymcc.exception;

import cn.xk.ymcc.code.GlobalErrorCode;

public class BusinessException extends RuntimeException{

    private String code;
    private String message;
    public BusinessException() {
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(GlobalErrorCode errorCode) {
        super(errorCode.getMessage());
        this.code=errorCode.getCode();
        this.message=errorCode.getMessage();
    }

}
